from odoo import http, fields
from abc import ABC, abstractmethod


class APICommon(http.Controller):

    @abstractmethod
    @http.route()
    def http_get_test(self, **kw):
        pass

    @abstractmethod
    @http.route()
    def http_post_test(self, **kw):
        pass

    @abstractmethod
    @http.route(method=['GET'])
    def get_package_type(self, **kw):
        """ 获取包裹类型 """
        pass

    @abstractmethod
    @http.route(method=['GET'])
    def get_country_list(self, **kw):
        """ 获取国家信息 """
        pass

    @abstractmethod
    @http.route()
    def get_postal_code_by_country(self, **kw):
        """ 通过国家获取邮编 """
        pass

    @abstractmethod
    @http.route()
    def get_languages_list(self, **kw):
        """ 获取语言列表 """
        pass
